package interpreter.example;

/**
 * 音符类
 * @author cheng:
 * @date 2019/4/26 14:33
 */
public class Note extends Expression{
    @Override
    public void excute(String key, double value) {
        String note = null;
        switch (key){
            case "C":
                note = "1";break;
            case "D":
                note = "2";break;
            case "E":
                note = "3";break;
            case "F":
                note = "4";break;
            case "G":
                note = "5";break;
            case "A":
                note = "6";break;
            case "B":
                note = "7";break;
            default:
        }
        System.out.println("Note: " + note);
    }
}
